import Vue from "vue";
import VueRouter from "vue-router";
import ClassLfy from "@/views/ClassLfy.vue";
import HomePage from "@/views/HomePage.vue";
import MyUser from "@/views/MyUser.vue";
import OrderAbc from "@/views/OrderAbc.vue";
import NotFound from "@/views/NotFound.vue";
import DeliveryAddress from "@/views/DeliveryAddress.vue";

import About from "../views/About.vue";
import UI_Router from "../views/UI_Router.vue";
import Contacts from "../views/Contacts.vue";

import No3Homework from "../views/No3Homework.vue";

import AllContacts from "../views/views2/All_contacts.vue";
import Alice from "../views/views2/Alice.vue";
import Bob from "../views/views2/Bob.vue";
Vue.use(VueRouter);
const router = new VueRouter({
  routes: [
    { path: "/", redirect: "/homepage" },
    { path: "/classlfy", component: ClassLfy },
    {
      path: "/myuser",
      component: MyUser,
      children: [{ path: "deliveryaddress", component: DeliveryAddress }],
    },
    { path: "/homepage", component: HomePage },
    { path: "/OrderAbc", component: OrderAbc },
    { path: "*", component: NotFound },

    {
      path: "/no3homework",
      component: No3Homework,
      children: [
        { path: "/", redirect: "/no3homework/uirouter" },
        {
          path: "about",
          component: About,
        },
        {
          path: "uirouter",
          component: UI_Router,
        },
        {
          path: "contacts",
          component: Contacts,
          children: [
            {
              path: "/",
              redirect: "/no3homework/contacts/allcontact",
            },
            {
              path: "allcontact",
              component: AllContacts,
            },
            {
              path: "alice",
              component: Alice,
            },
            {
              path: "bob",
              component: Bob,
            },
          ],
        },
      ],
    },
  ],
});

export default router;
